home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2.sit
/
Raven 1.2
/
Source
/
Foundation
/
OS
/
ZBootStrap.h
< prev
next >
Wrap
Text File
|
1997-02-20
|
2KB
|
78 lines
/*
* File: ZBootStrap.h
* Summary: An object used to initialize and terminate an application.
* Written by: Jesse Jones
*
* Copyright ゥ 1996 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 10/27/96 JDJ Created (from ZAppBootStrap)
*/
#pragma once
#include <string>
//-----------------------------------
// Forward References
//
template<class TYPE, class ALLOCATOR> class list;
// ===================================================================================
// class TBootStrap
// If you're writing a full fledged application you'll probably want to use
// TAppBootStrap.
// ===================================================================================
class TBootStrap {
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~TBootStrap();
TBootStrap();
//-----------------------------------
// New API
//
public:
virtual void Boot();
static bool Running();
// Returns true after the system has been initialized and before
// static objects start getting destroyed.
static bool Exiting();
// Returns true if the program is exiting normally.
static void DoEarlyInit();
// This is called before static objects are constructed and needs
// to be defined this in Main.cpp. You should use it to call MoreMasters
// and to create the object heap.
protected:
virtual void HandleSystemCheck();
// Calls OnSystemNeeds to construct a list of reasons the app
// can't run. If the list isn't empty an alert is displayed and
// ExitToShell is called.
virtual void OnSystemNeeds(list<string, allocator<string> >& needs);
// Override and return strings indicating why the user can't run
// the app. For example, if the user needs the Drag Manager and
// QuickTime add 'the Drag Manager' and 'QuickTime' to the list.
virtual void OnBoot() {}
//-----------------------------------
// Member data
//
private:
static bool msRunning;
static bool msExiting;
};